#ifndef _CCATTACHMENT_H_
#define _CCATTACHMENT_H_

#include "CCSpineObject.h"
#include "cocos2d.h"

NS_CC_BEGIN

class CCAttachment : public CCSpineObject {
private:
	/// x offset
	float m_x;
    
	/// y offset
	float m_y;
    
	/// rotation in degree, positive value means counter-clockwise, x axis is zero degree
	float m_rotation;
    
	/// x scale
	float m_scaleX;
    
	/// y scale
	float m_scaleY;
    /*
    float m_width;
    float m_height;*/
    
    /// image path
    const char* m_path;
    
protected:
	CCAttachment();
    
public:
	virtual ~CCAttachment();
	static CCAttachment* create();
    
	/// set x offset
	void setX(float x) { m_x = x; }
    
	/// get x offset
	float getX() { return m_x; }
    
	/// set y offset
	void setY(float y) { m_y = y; }
    
	/// get y offset
	float getY() { return m_y; }
    
	/// set rotation
	void setRotation(float r) { m_rotation = r; }
    
	/// get rotation
	float getRotation() { return m_rotation; }
    
	/// set x scale
	void setScaleX(float x) { m_scaleX = x; }
    
	/// get x scale
	float getScaleX() { return m_scaleX; }
    
	/// set y scale
	void setScaleY(float y) { m_scaleY = y; }
    
	/// get y scale
	float getScaleY() { return m_scaleY; }
    
    /*
    void setWidth(float width) { m_width=width; }
    float getWidth() { return m_width; }
    
    void setHeight(float height) { m_height=height; }
    float getHeight() { return m_height; }*/
    
    /// set path
    void setPath(const char* path);
	const char* getPath() {return m_path;};
    
    void synchro(CCNode* node);
    
    CCSpriteFrame* createRelatedSpriteFrame();
};

NS_CC_END

#endif